﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BPM.Entity
{
    /// <summary>
    /// 产品组装(组装员创建)
    /// </summary>
    public class ProductAssemble : BaseEntity
    {
		public ProductAssemble()
		{
			this._User = this.CreateReference<User>();
			this._ProductAssembleDefinition = this.CreateReference<ProductAssembleDefinition>();
		}

		private ILazyEntityRef<ProductAssembleDefinition> _ProductAssembleDefinition;
		/// <summary>
        /// 关联的产品组装定义
        /// </summary>
		public ProductAssembleDefinition ProductAssembleDefinition
		{
			get
			{
				return this._ProductAssembleDefinition.Entity;
			}
			set
			{
				this._ProductAssembleDefinition.Entity = value;
			}
		}
        /// <summary>
        /// 关联的产品组装定义的Id
        /// </summary>
		public int ProductAssembleDefinitionId
		{
			get
			{
				return this._ProductAssembleDefinition.Id;
			}
			set
			{
				this._ProductAssembleDefinition.Id = value;
			}
		}

		private ILazyEntityRef<User> _User;
		/// <summary>
		/// 组装员
		/// </summary>
		public User User
		{
			get
			{
				return this._User.Entity;
			}
			set
			{
				this._User.Entity = value;
			}
		}
		/// <summary>
		/// 组装员
		/// </summary>
		public int UserId
		{
			get
			{
				return this._User.Id;
			}
			set
			{
				this._User.Id = value;
			}
		}

        /// <summary>
        /// 组装用到的物料
        /// </summary>
        public IList<ProductAssembleItem> ItemList { get; set; }

        /// <summary>
        /// 组装时间
        /// </summary>
        public DateTime AssembleTime { get; set; }
    }
}
